package com.xuelang.pipeline.app.resource.converter;

import com.xuelang.pipeline.client.resource.dto.SpaceDTO;
import com.xuelang.pipeline.domain.resource.Space;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * 空间DTO与空间实体转换器
 *
 * @author xiwen.zxg
 * @since 2024/5/15
 */
@Mapper
public interface SpaceDTOToSpaceConverter {
    SpaceDTOToSpaceConverter INSTANCE = Mappers.getMapper(SpaceDTOToSpaceConverter.class);

    /**
     * Space转化为SpaceDTO
     * @param space
     * @return
     */
    SpaceDTO spaceToSpaceDTO(Space space);

    /**
     * SpaceDTO转化为Space
     * @param spaceDTO
     * @return
     */
    Space spaceDTOToSpace(SpaceDTO spaceDTO);
}
